package com.growthgate.bootcommon.config;

import com.growthgate.bootcommon.factory.EnumConverterFactory;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * WebConfigurer
 *
 * @author GrowthGate
 * @date 2020/2/24
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addFormatters(@NotNull FormatterRegistry registry) {
        registry.addConverterFactory(new EnumConverterFactory());
    }

}